#include "Stereo.h"

void Stereo::Info(std::ostream &stream){
	//put out the on or off state
	stream << "Stereo is ";
	if (mOnOffState == eOn){
		stream << "on";
	}
	else{
		stream << "off";
	}
	//put out the open or close state of the CD slot
	stream << " CD is ";
	if (mCDState == eOpened){
		stream << "open";
	}
	else{
		stream << "closed";
	}
	stream << std::endl;
}

void Stereo::Open(){
	mCDState = eOpened;
}

void Stereo::Close(){
	mCDState = eClosed;
}

CDState Stereo::getCDState() const{
	return mCDState;
}

void Stereo::setCDState(CDState state){
	mCDState = state;
}